
/* =========================================
   StudyEG - Main Stylesheet
   Global Design System
========================================= */


/* =========================================
   1. LOCAL FONTS
   Alexandria & Tajawal
========================================= */


/* -----------------------------------------
   Alexandria Font
----------------------------------------- */

@font-face {
    font-family: 'Alexandria';
    src: url('../fonts/Alexandria-Thin.woff2') format('woff2');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Alexandria';
    src: url('../fonts/Alexandria-ExtraLight.woff2') format('woff2');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Alexandria';
    src: url('../fonts/Alexandria-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Alexandria';
    src: url('../fonts/Alexandria-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Alexandria';
    src: url('../fonts/Alexandria-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Alexandria';
    src: url('../fonts/Alexandria-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Alexandria';
    src: url('../fonts/Alexandria-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Alexandria';
    src: url('../fonts/Alexandria-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Alexandria';
    src: url('../fonts/Alexandria-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}


/* -----------------------------------------
   Tajawal Font
----------------------------------------- */

@font-face {
    font-family: 'Tajawal';
    src: url('../fonts/Tajawal-ExtraLight.woff2') format('woff2');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Tajawal';
    src: url('../fonts/Tajawal-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Tajawal';
    src: url('../fonts/Tajawal-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Tajawal';
    src: url('../fonts/Tajawal-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Tajawal';
    src: url('../fonts/Tajawal-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Tajawal';
    src: url('../fonts/Tajawal-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Tajawal';
    src: url('../fonts/Tajawal-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}


/* =========================================
   2. CSS VARIABLES
========================================= */

:root {

    /* Brand Colors */
    --primary-color: #794E13;
    --secondary-color: #F2B84F;

    /* Text Colors */
    --heading-color: #212121;
    --text-color: #333333;
    --muted-color: #777777;
    --light-text-color: #999999;

    /* Background Colors */
    --background-color: #FFFFFF;
    --light-background: #F8F6F2;
    --soft-background: #FBF9F5;

    /* Border Colors */
    --border-color: #EAE5DD;
    --light-border-color: #F1EDE7;

    /* Layout */
    --container-width: 1340px;
    --container-wide: 1340px;

    /* Spacing */
    --section-spacing: 70px;

    /* Border Radius */
    --radius-small: 6px;
    --radius-medium: 10px;
    --radius-large: 16px;

    /* Shadows */
    --shadow-small: 0 3px 12px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.08);

    /* Transitions */
    --transition: 250ms ease;

}


/* =========================================
   3. RESET
========================================= */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    margin: 0;
    padding: 0;
    direction: rtl;

    font-family: 'Tajawal', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.8;

    color: var(--text-color);
    background-color: var(--background-color);

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    margin-top: 0;
}

p {
    margin-top: 0;
}


/* =========================================
   4. TYPOGRAPHY
========================================= */

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;

    font-family: 'Alexandria', sans-serif;
    font-weight: 700;
    line-height: 1.5;

    color: var(--heading-color);
}

h1 {
    font-size: clamp(28px, 3vw, 40px);
}

h2 {
    font-size: clamp(24px, 2.5vw, 32px);
}

h3 {
    font-size: 22px;
}

h4 {
    font-size: 19px;
}

h5 {
    font-size: 17px;
}

h6 {
    font-size: 15px;
}

p {
    margin-bottom: 18px;
}

small {
    font-size: 13px;
}

strong,
b {
    font-weight: 700;
}


/* =========================================
   5. LINKS
========================================= */

a {
    transition:
        color var(--transition),
        background-color var(--transition);
}

a:hover {
    color: var(--primary-color);
}


/* =========================================
   6. LAYOUT CONTAINERS
========================================= */

.container,
.site-container {
    width: min(100% - 40px, var(--container-width));
    margin-inline: auto;
}

.container-wide {
    width: min(100% - 40px, var(--container-wide));
    margin-inline: auto;
}

.content-wrapper {
    width: 100%;
    min-width: 0;
}


/* =========================================
   7. SECTIONS
========================================= */

.section {
    padding-block: var(--section-spacing);
}

.section-light {
    background-color: var(--light-background);
}

.section-soft {
    background-color: var(--soft-background);
}

.section-title {
    margin-bottom: 12px;
    font-family: 'Alexandria', sans-serif;
    font-size: clamp(23px, 2.5vw, 30px);
    font-weight: 700;
    color: var(--heading-color);
}

.section-description {
    max-width: 750px;
    margin-bottom: 30px;
    color: var(--muted-color);
    font-size: 16px;
}


/* =========================================
   8. BUTTON BASE
========================================= */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 46px;
    padding: 10px 22px;

    border: 1px solid transparent;
    border-radius: var(--radius-small);

    font-family: 'Tajawal', sans-serif;
    font-size: 16px;
    font-weight: 700;

    transition: var(--transition);
}

.button-primary {
    color: #FFFFFF;
    background-color: var(--primary-color);
}

.button-primary:hover {
    color: #FFFFFF;
    background-color: #603C0E;
}

.button-secondary {
    color: var(--heading-color);
    background-color: var(--secondary-color);
}

.button-secondary:hover {
    color: var(--heading-color);
    background-color: #E7A936;
}

.button-outline {
    color: var(--primary-color);
    background-color: transparent;
    border-color: var(--primary-color);
}

.button-outline:hover {
    color: #FFFFFF;
    background-color: var(--primary-color);
}


/* =========================================
   9. FORM ELEMENTS
========================================= */

input,
textarea,
select {
    max-width: 100%;
    color: var(--text-color);
    background-color: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(121, 78, 19, 0.10);
}

input::placeholder,
textarea::placeholder {
    color: var(--light-text-color);
}


/* =========================================
   10. CARDS
========================================= */

.card {
    background-color: #FFFFFF;
    border: 1px solid var(--light-border-color);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-small);
    transition:
        transform var(--transition),
        box-shadow var(--transition);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}


/* =========================================
   11. ACCESSIBILITY
========================================= */

.skip-link {
    position: absolute;
    top: -100px;
    right: 15px;
    z-index: 9999;

    padding: 10px 15px;
    color: #FFFFFF;
    background-color: var(--primary-color);
    border-radius: var(--radius-small);
}

.skip-link:focus {
    top: 15px;
}

:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
}


/* =========================================
   12. RESPONSIVE
========================================= */

@media (max-width: 768px) {

    :root {
        --section-spacing: 45px;
    }

    body {
        font-size: 15px;
    }

    .container,
    .site-container,
    .container-wide {
        width: min(100% - 30px, var(--container-width));
    }

    .section-description {
        font-size: 15px;
    }

}

@media (max-width: 480px) {

    :root {
        --section-spacing: 35px;
    }

    h3 {
        font-size: 19px;
    }

    h4 {
        font-size: 17px;
    }

    .button {
        min-height: 42px;
        padding: 9px 17px;
    }

}


/* =========================================
   13. REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

}


/* =========================================
   14. Default WordPress Page
========================================= */

.eg-default-page {
    padding-block: clamp(36px, 5vw, 72px);
}

.eg-default-page__inner {
    max-width: 960px;
}

.eg-default-page__title {
    margin-bottom: 24px;
}

.eg-default-page__content {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--text-color);
    font-size: 17px;
    line-height: 2;
}

.eg-default-page__content > * + * {
    margin-top: 1.25em;
}

.eg-default-page__content img {
    height: auto;
}

.eg-default-page__pagination {
    margin-top: 30px;
}
